added support to while and do-while loops; fixes #14