added cancellation feature