Implemented task 1 (preprocess)