updated databased api