Refactor attendance