generalize db action works