new db api finished