prepare for template