i actually wanted this function on the db object