made timekeeper function