update documentation (there is still a little memory leak in the code)