handle chat query