Functionized,  made swapping relative