Implemented swap and revert methods