implemented all clock functionality