cleaning up clock handling