adding plotting and better analysis