start modularizing: clock.c