How does the sentence end?

Kayla did amazing on the exam compared to Elena, due to
Elena being unprepared for it.