templates before search