removed unused if-else branch