add plot3 and code