updated database api