Got rid of unused for each loop