changes in While Loop an Range Loop