-- minor bug fix in last commit
-- added documentation