implementing cancel