first version of preprocessing section