added stop fucntion