This is the wrong order of iteration. The order needs to be insertion order