first pass at implementing clock sync code