use db mode