commenting and cleaning the code
main calculation: section creation, code cleaning