added some very basic functionality to chat window