doing a foreach loop is faster than using array_map (which does a function call for each item of the array)