Remove unnecessary for loop