added more to hist function