plot3 working
finalize printing into file