add contract to the swap method