implemented plot3