improved db config