some what revised and complicated version of gtestSample