use marshal and unmarshal in client