conditional string compare statments reduced