bug fix in Swapping elements, now elements swap correctly in Y axis