wip, at least it runs without crashing, though it's expanding some buckets hugely more than it should.