added function setAttributes for table