Changes .map to .each

was discarding array