added attendance functionality