modified way to set attribute rating