adds plot3 and its code