started writing preprocessing code