Remove the spaces from the following sentence: His teaching was not exclusively applied mathematics, however, for he taught a lattice theory course on several occasions.
Histeachingwasnotexclusivelyappliedmathematics,however,forhetaughtalatticetheorycourseonseveraloccasions.