Finally got the calculation to work and now the last commit for this is when i add more comments to it.