add func to stop