CR changes to while loops