removed unnecessary for loop