add else-if and else statement