attendance functionality