preprocessed refactor