db is a kwarg