version using .forEach