Change dbid to a kwarg