Removed unnecessary for loop
Removed unnecessary loop locations