needed to change for loop declaration