'doc' function improved.
Merge pull request #1 from bfontaine/master

'doc' function improved