correction of calculations. TODO paraview still not working