refactoring attendance actions