change ping db logic