Identify the type of adverb in the following sentence:
Thereafter, he looked both ways when crossing the road.
O A. Compound adverb
O B. Coordinate adjective
C. Phrasal adverb
O D. Simple adverb