adding revert features helper function