got save data and plots working