refactor setClock