added set_attribute, get_attribute functions