implemented .map where I was iterating through arrays, pushing values into a waiting array