adding db handler for offline and populate db