added histogram option to stats.py