doc: add some documentation in the code