factor out parsing
remove @docs
add to_s
add some pendng tests