started on template parsing