added state machine module