added CLOCK functionality

mostly just added clock functionality
Merge branch 'clock'