using a template for view