adding Histogram plotting function