adding user s type check to select the template to render (patch)