modify simpleclient, add some test.