set attributes method added, test work again in karma