now plotting correct X
increasing accuracy. adding legend