preprosessing code