Implemented the clock