removing bad code