update test case for memory state machine
update main package to new state machine