handle clock changes
refactor clock changes code, closes #2