Updated the way data is fetched from the DB