basic implementation of clock