added some docs and coments
added some comments