improve functional tests