added in an if-statement to take care of the possibility of two not ever occuring together
added in an if-statement to take care of the possibility of two not ever occuring together