refactor block context edge cancel
rename opt argument
edge cancel logic to other func
small miss