Modified histogram method