chat box works correctly