more speed optimizations