added sanity checks to clock