finished 2/3 steps in preprocessing scripts