implement if, while and for