added contingency for no students in attendance page