rename setAttributes to setRawAttributes to avoid confusion.