the only problem with this patch that I see is that it is not in-place. and needs 3 times the memory of the old one