optimizing tests