change db logic