allow for bigger grams, fix bug wrt not recasting into hash