cleanup preprocessing