removed clockCount variable