moving those functions inside the scope of their test functions