I can't read codes properly yet, but does PI in line 6 do anything in the WHILE loop? Looks to me it's for the FOR loop.