Making changes to add stop function