ref #12 add cancel support