broken optimization
works but speed is much worse
back to operating in place - works well
back to operating in place - works well
merge