replaced for(;;) with while(true), they do the samething, while(true) is more readable.