Added swapping feature.