add absences function