added documentation and changes