bug fix

- add 'while'
- fix wrong level
- indent last-line 'end'