Made if-statement into an else-if statement