first implementation of the clock