hm I'm surprised the compiler does not do this optimization, I wonder why