changed to generate a 3d surface plot