rework state machine MK III

started adding control signals