refactoring preprocessor