refactor
add while loop support
add for loop support
add test