Added cancel functionalitiy