generalize db runner