improved cancellation token usage