exercise 6-1: linked ping-pong echo