working on two pass preprocess