added functions, while, if, if else constructs