hash uses 1-based level numbers