data pre-processing for mf