adjust directory, move data-structrue to base
add fsm, not completed