fully working swap