working use of best matching attribute