use best matching attribute
working use of best matching attribute