Refactored revert-method