Each was returning the original array