Add setAttributes()
Merge pull request #9 from dara123/master

Add setAttributes()