code from gtest tutorial found at http://2manyprojects.net