Added setAttributes method