chat example partially fixed