set data attribute in set method