implement simple clock