use db instead of filtering a collection