merge in changes from Al's version