functional tests now working