improved chat js