wrap tests in a function