added rest of client protocol