remove a risky while-loop that could have caused problems with lazy eval