new code for storing on data required for plotting