a chat program, c version