exerises, changing hard-coded view html function to template-based.