Added support for attributes
added some comments about attributes