clockout function