more intelligent path resolution