Create whileAndDoWhile