adding a utility file and writing a function to render template html conveniently