separating out dsv logic