added endQuiz function pbs to solve