add cancel method
protected codes