refactor preprocessor