updated the documentation of the code