generalization on swapping and position referal