Swapped map call for for loop