more optimizations for tests