#3 db helper and api facade