update chat code and style works