added example to .swap method