specify db as first-class arg