included relative weights in histogram method