cleaned up path resolution a bit