added and implemented factory for attendance_record