create an entirely new data structure

... is much faster for larger documents