Added function for plots.
Updated timing,