fixed bug
completed check_attendance() function