added doc to code