working hierarchical wordstat dictionary function