cleanup
find the best matching attribute to a given path