Reducing the uses of each()