refactor: small changes to cancellation functions