added visualization for 3D