generalizes and simplifies db interaction