How does the sentence end?

John preferred to go to English class rather than math class, because he thought the teacher for the
math class was worse.