Why the if/else if both cases do the same? Is anything missing in one of them?