added event handlers for chat box/btns