added some client codes