added data access object
loading of templates working through the dao