add statemachine for incoming data parser