added support for while and for statements