Simplify the "each" loop