tests in functions