chat refactor 1