refactoring out a testhelper