better path resolution