change to use db