get chat with history working
merge functioning chat branch