Adding cancellation code