quick bug fix and some documentation