implemented revert button.