updated for template