implemented dynamically displaying chat on client