add unpacking method for n-d histogram