Remove use of Array.map ( to support older browsers )