db improvements