revamped functional_tests