template preprocessor engine