their family moved to london where gray studied medicine