update unit test and functional test