steps through while loops
fixed the merge conflicts