removed non-functional for each loop