changed pause to stop function