Optimize, revert to stack