added clearTimeout to stop function