Complex sentence: From 1838 to 1840 he commanded the 74 gun ship of the line USS "Ohio" and served as flag captain to the legendary Commodore Isaac Hull while Hull commanded the Mediterranean Squadron.
Split into simpler sentences: From 1838 to 1840 he commanded the 74 gun ship of the line USS "Ohio". During this assignment he served as flag captain to the legendary Commodore Isaac Hull while Hull commanded the Mediterranean Squadron.