fix syntax of whilest