refactor to remove cancel logic.
docstring.
fix test coverage.