attempt to fix the bug with multiline sattements for if and while loop