couple of small optimizations, 150 -> 200 fps