Read the excerpt from The Story of Dr. Dolittle by Hugh Lofting.

So early the next morning the Doctor went down to the seashore. And when he came back he told the animals it was all right—the sailor was going to lend them the boat . . .

Having thanked the sharks again for their kindness, the Doctor and his pets set off once more on their journey home in the swift ship with the three red sails.

Which word helps readers know whether thanking the sharks happens before or after the Doctor and his pets sail home?

so
when
having
once

having