updated documentation and minor bug fix