unnecessary branching of conditions  removed