First draft of stage1: basic pre-processing