implementing setting of attributes too