remove duplicated else if case