latest code, code to verify the results with Vtk added