included clock function