added some chatbox functionality