Now calculating all swaps directions with for loop instead