added documentation to code
Merge branch 'gap_inflection'