william gregory