removing bad logic