added plot and csv save