Be careful when moving lines of code
Going from
do { }while (x == true);
to
while(x == true) { }
Should simply change it from always executing the first time, to only when the condition is true. However, going to
while(x == true); { }
will create an endless loop (notice the semicolon)