added serial clock, fsm