Adding support for cancel
Updating example