histogram bugs fixed, allowing user to specify the min and max values for the histogram