Revert state function