Added a function to the script and called it in the even an else if is triggered. Way better than using the same block over and over again.