one time template compilation