Deleted redundant for loops