fixing else if statement