minor changes to swap