add stop routine