move parser to a class_attribute. add more documentation