correction to else if statement