removed revert function