made data for template/snippet function optional