wiring up to db