under working,  fix statemachine table, add all inputs