added attribute parsing from xml
a tad bit of documenting