shortening repeat_while