add attendances function for admin