got rid of Array.map function