how do I cause a function of my code to stop running when another one runs.