add function to stop already executing task