When this program executes another application, it is the same copy and paste code as all the other times, create a function to just handle run events