Method modified - now it returns value attribute.