ex5, working chat, but need improvement.