* factor print code
* edit docs