fixed calculations
Merge branch 'master' of https://github.com/Ingis/Master_thesis