fixed parser and whilestatement