rearranged locals in client.h