add step mode
cleanup
graph/for loop  refactoring
fix step mode
cleanup