master rewrite for gtest