add a few helpers, dry up some of the path logic