refactored cancel interface