support for while-do and do-while loops