while-loop tests added