added code for plots of results