removed "bad" code the hard way