client side to handle job cancellation; tested locally