clock exercise from lecture 3