add helper to deal with paths and a result