bug fix and updated documentation