implemented control-flow structurs: if-then-else and while-do