implement revert feature