Got rid of Array.map to overcome IE8