added histogram helper