Preprocessing template