working on the db interface