build histogram at level one