state machine for clk implemented + time, temp transision