add functional test cases