refactor the template calls and add a title