changed the data fetching template to make the minimal amount of ODB calls