swap script finalized