doc rewrite
bug correction, docs