adding templates to view