edited database api