Added db object argument