remove superfluous for loop