Added hist function