added chat to code