scrubing legacy code