revert loop