fixed up cleaning code