add stop fucntion