added 3D and 2D analysis