added debugging stuff for hist