changed the for loop to a map function... I wouldn't be able to sleep tonight with a for loop in that part of the code