outsourced algorithm, added documentation
Merge branch 'master' into gh-pages