fix genFor
fix else block
remove no longer needed code
add test
fix , in for