work on the database api