What is wrong with BTree Deletion
Hi
I am trying to delete nodes from BTree . Can anyone please tell me what is wrong with it . It delets the wrong node ???
public BTreeA delete(BTreeA node ) {
// use integer in order to parseInt string ("StId") and then compare the values
int x , y ,z ;
if ( root.counter < 1 ){
ptemp = root ;
root.counter++;
x = Integer.parseInt(node.StId );
y = Integer.parseInt(ptemp.StId);
if( root != null ) { // descend tree to find parent
if ( x < y ){
ptemp = root.left ;
root.left = delete(root.left ) ;
} else
// or else move right
if ( x > y ){
ptemp = root.right ;
root.right = delete (root.right ); // else it must be greater
}else{
// print
System.out.println();
System.out.println( "Student ID "+ptemp.StId +" is in the tree!");
System.out.println ("Student name is : "+ptemp.StName);
System.out.println ("Student Address is : "+ptemp.StAddress );
System.out.println( "***OOOOO***oooo***OOOO***");
if( root.left == null && root.right == null ){
root = null ;
} else
if(root.left != null && root.right == null){
root = root.left ;
} else
if(root.right != null && root.left == null ){
root = root.right ;
} else {
if(root.right.left == null){
root.right.left = root.left ;
root.right = root ;
}else {
BTreeA a,b = root.right ;
while ( b.left.left != null )
b = b.left ;
a= b.left ;
b.left = a.right ;
a.left = root.left ;
a.right = root.right ;
root = a ;
return this ;
}//end of method
// main method
BTreeA node = new BTreeA () ;
node.StId = "2";
node.StName = "Fiona";
node.StAddress = " Waterford " ;
root.delete (node);
Hi
I am trying to delete nodes from BTree . Can anyone
please tell me what is wrong with it . It delets the
wrong node ???
public BTreeA delete(BTreeA node ) {
// use integer in order to parseInt string ("StId")
and then compare the values
int x , y ,z ;
if ( root.counter < 1 ){
ptemp = root ;
root.counter++;
x = Integer.parseInt(node.StId );
y = Integer.parseInt(ptemp.StId);
if( root != null ) { // descend tree to find
nd parent
if ( x < y ){
ptemp = root.left ;
root.left = delete(root.left ) ;
} else
// or else move right
if ( x > y ){
ptemp = root.right ;
root.right = delete (root.right ); // else it must
st be greater
}else{
// print
System.out.println();
System.out.println( "Student ID "+ptemp.StId +" is
s in the tree!");
System.out.println ("Student name is :
: "+ptemp.StName);
System.out.println ("Student Address is :
: "+ptemp.StAddress );
System.out.println( "***OOOOO***oooo***OOOO***");
if( root.left == null && root.right == null ){
root = null ;
} else
if(root.left != null && root.right == null){
root = root.left ;
} else
if(root.right != null && root.left == null ){
root = root.right ;
} else {
if(root.right.left == null){
root.right.left = root.left ;
root.right = root ;
}else {
BTreeA a,b = root.right ;
while ( b.left.left != null )
b = b.left ;
a= b.left ;
b.left = a.right ;
a.left = root.left ;
a.right = root.right ;
root = a ;
return this ;
}//end of method
// main method
BTreeA node = new BTreeA () ;
node.StId = "2";
node.StName = "Fiona";
node.StAddress = " Waterford " ;
root.delete (node);
Similar Messages
-
What's wrong with this delete?
String query = "Delete from K9Manager where intakeno = ?";
PreparedStatement pstmt = db.createPreparedStatement(query);
pstmt.setString(1, request.getParameter("f_Page").trim());
pstmt.executeUpdate();
out.println("+query+");
No matter what I always get this error. I don't understand it.. any hints?
Unable to query K9Manager tableWhich database you are using? The most common problem may be the user wich is trying to delete the record has no right to delete a record.
-
What is wrong with my delete method in my binary tree
code..okay so somehow everytime I delete a number that exist it says it has been deleted later when..I display the tree the node wasn' t really deleted at all here is the code..
public boolean delete(int numbers)
Node now = rootOrigin;
Node ancestor = rootOrigin;
boolean isLeftChild = true;
if(find(numbers)!= null)
if((now.LeftChildOfMine == null)&&(now.RightChildOfMine == null))
if(now == rootOrigin)
rootOrigin = null;
else if(isLeftChild)
ancestor.LeftChildOfMine = null;
else
ancestor.RightChildOfMine = null;
else if((now.LeftChildOfMine != null)&&(now.RightChildOfMine == null))
if(now==rootOrigin)
now = now.LeftChildOfMine;
else if(isLeftChild)
ancestor.LeftChildOfMine = now.LeftChildOfMine;
else
ancestor.RightChildOfMine = now.LeftChildOfMine;
else if((now.LeftChildOfMine == null)&&(now.RightChildOfMine != null))
if(now==rootOrigin)
rootOrigin = now.RightChildOfMine;
else if(isLeftChild)
//ancestor.LeftChildOfMine = now.RightChildOfMine;
ancestor.RightChildOfMine = now.LeftChildOfMine;
else
//ancestor.RightChildOfMine = now.RightChildOfMine;
ancestor.LeftChildOfMine = now.RightChildOfMine;
else if((now.LeftChildOfMine != null)&&(now.RightChildOfMine != null))
//get successor of node to delete(current)
Node successor = getSuccessor(now);
//connect parent of current to successor instead
if (now == rootOrigin)
rootOrigin = successor;
else if(isLeftChild)
ancestor.LeftChildOfMine = successor;
else
ancestor.RightChildOfMine = successor; //connect successor to current's left child
successor.LeftChildOfMine = now.LeftChildOfMine;
return true;
else
return false;
}Also here is the method that finds the successor of the node that will replace the node that i want to delete
private Node getSuccessor(Node delNode)
Node successorParent = delNode;
Node successor = delNode ;
Node now = delNode.RightChildOfMine;
while(now != null)
successorParent = successor;
successor = now;
now = now.LeftChildOfMine;
if(successor != delNode.RightChildOfMine)
successorParent.LeftChildOfMine = successor.RightChildOfMine;
successor.RightChildOfMine = delNode.RightChildOfMine;
return successor;
}Okay also a while ago when I focused on traversing(nodes kept displaying more than once) my prof. said the problem was in my insertion method.
It mayber the insertion method's fault again
public void insert(int numbers)
Node newNode = new Node(numbers);
if(rootOrigin == null)
rootOrigin = newNode; // newNode will be the root of the tree
else
Node current = rootOrigin;
Node parent;
while(true)
parent = current;
if(numbers < current.numbers)
current = current.LeftChildOfMine;
if(current == null)
parent.LeftChildOfMine = newNode;
return;
else
current = current.RightChildOfMine;
if(current == null)
parent.RightChildOfMine = newNode;
return;
}DaDonYordel wrote:
if(find(numbers)!= null)
if((now.LeftChildOfMine == null)&&(now.RightChildOfMine == null))Shouldn't you be assigning the result of the find() to now? -
I have just deleted an app call Wattpad and I want to download it again but it always says that I need to retry downloading it. I have tried restart a few times but nothing seems to happen. What's wrong with my phone? If I reset my phone will my pictures
Hello there, SamanthaYikwai.
The following Knowledge Base article offers up some basic steps to try for reinstalling an app:
iOS: An app you installed unexpectedly quits, stops responding, or won’t open.
http://support.apple.com/kb/ts1702
Reinstall the app
Remove the app from your device and reinstall it. Remember that deleting an app also deletes its data.
Delete the app.
Press the Home button.
Go to the App Store and download the app again.
Wait for the app to download, then open it from the Home screen.
If the download stops, you can resume it.
If the issue persists, then you may want to try and sync the application to your iOS device using your computer by following the information in this article, under the section "Download previous purchases on Mac or PC":
Download past purchases
http://support.apple.com/kb/HT2519
Thanks for reaching out to Apple Support Communities.
Cheers,
Pedro. -
C# - What's wrong with a table called JOBS? :(
Post Author: Gee
CA Forum: .NET
Hi
I've just moved up to .NET 2005. and am having a big problem right now with one report in particular.
The report uses an Oracle table called "JOBS". It worked just fine in .NET 2003. Now though, it comes up with the dreaded field name not known error.
So, I tried to just do a completely new report with just ONE field from the JOBS table on it. It doesn't want to know!
I then copied (so it was IDENTICAL) the table structure and data to a new one called "JOBSTEST". The simple report worked (once I'd changed it to use the JOBSTEST fields of course)
I deleted the original JOBS table, copied a new JOBS table from the JOBSTEST table and... it didn't work again!
So, what's wrong with having a table called "JOBS"? Because that seems to be the problem!
Oh... it works ok on the development machine. Just not any other. ALL other reports work fine!
Thank you so much for your time in helping mePost Author: Gee
CA Forum: .NET
Hi
I've just moved up to .NET 2005. and am having a big problem right now with one report in particular.
The report uses an Oracle table called "JOBS". It worked just fine in .NET 2003. Now though, it comes up with the dreaded field name not known error.
So, I tried to just do a completely new report with just ONE field from the JOBS table on it. It doesn't want to know!
I then copied (so it was IDENTICAL) the table structure and data to a new one called "JOBSTEST". The simple report worked (once I'd changed it to use the JOBSTEST fields of course)
I deleted the original JOBS table, copied a new JOBS table from the JOBSTEST table and... it didn't work again!
So, what's wrong with having a table called "JOBS"? Because that seems to be the problem!
Oh... it works ok on the development machine. Just not any other. ALL other reports work fine!
Thank you so much for your time in helping me -
What's wrong with this SQL?
what's wrong with this SQL?
Posted: Jan 16, 2007 9:35 AM Reply
Hi, everyone:
when I insert into table, i use the fellowing SQL:
INSERT INTO xhealthcall_script_data
(XHC_CALL_ENDED, XHC_SWITCH_PORT, XHC_SCRIPT_ID, XHC_FAX_SPECIFIED)
VALUES (SELECT TO_DATE(HH_END_DATE||' '||HH_END_TIME,'MM/DD/YY HH24:MI:SS'), HH_SWITCHPORT, HH_SCRIPT,'N'
FROM tmp_healthhit_load WHERE HH_SCRIPT !='BROCHURE' UNION
SELECT TO_DATE(HH_END_DATE||' '||HH_END_TIME,'MM/DD/YY HH24:MI:SS'), HH_SWITCHPORT, HH_SCRIPT,'N' FROM tmp_healthhit_load WHERE HH_SCRIPT !='BROCHURE');
I always got an error like;
VALUES (SELECT TO_DATE(HH_END_DATE||' '||HH_END_TIME,'MM/DD/YY HH24:MI:SS'), HH_SWITCHPORT,
ERROR at line 3:
ORA-00936: missing expression
but I can't find anything wrong, who can tell me why?
thank you so much in advance
mpowel01
Posts: 1,516
Registered: 12/7/98
Re: what's wrong with this SQL?
Posted: Jan 16, 2007 9:38 AM in response to: jerrygreat Reply
For starters, an insert select does not have a values clause.
HTH -- Mark D Powell --
PP
Posts: 41
From: q
Registered: 8/10/06
Re: what's wrong with this SQL?
Posted: Jan 16, 2007 9:48 AM in response to: mpowel01 Reply
Even I see "missing VALUES" as the only error
Eric H
Posts: 2,822
Registered: 10/15/98
Re: what's wrong with this SQL?
Posted: Jan 16, 2007 9:54 AM in response to: jerrygreat Reply
...and why are you doing a UNION on the exact same two queries?
(SELECT TO_DATE(HH_END_DATE||' '||HH_END_TIME,'MM/DD/YY HH24:MI:SS') ,HH_SWITCHPORT ,HH_SCRIPT ,'N' FROM tmp_healthhit_load WHERE HH_SCRIPT !='BROCHURE' UNION SELECT TO_DATE(HH_END_DATE||' '||HH_END_TIME,'MM/DD/YY HH24:MI:SS') ,HH_SWITCHPORT ,HH_SCRIPT ,'N' FROM tmp_healthhit_load WHERE HH_SCRIPT !='BROCHURE');
jerrygreat
Posts: 8
Registered: 1/3/07
Re: what's wrong with this SQL?
Posted: Jan 16, 2007 9:55 AM in response to: mpowel01 Reply
Hi,
thank you for your answer, but the problem is, if I deleted "values" as you pointed out, and then execute it again, I got error like "ERROR at line 3:
ORA-03113: end-of-file on communication channel", and I was then disconnected with server, I have to relogin SQLplus, and do everything from beganing.
so what 's wrong caused disconnection, I can't find any triggers related. it is so wired?
I wonder if anyone can help me about this.
thank you very much
jerry
yingkuan
Posts: 1,801
From: San Jose, CA
Registered: 10/8/98
Re: what's wrong with this SQL?
Posted: Jan 16, 2007 9:59 AM in response to: jerrygreat Reply
Dup Post
jerrygreat
Posts: 8
Registered: 1/3/07
Re: what's wrong with this SQL?
Posted: Jan 16, 2007 10:00 AM in response to: Eric H Reply
Hi,
acturlly what I do is debugging a previous developer's scipt for data loading, this script was called by Cron work, but it never can be successfully executed.
I think he use union for eliminating duplications of rows, I just guess.
thank you
jerry
mpowel01
Posts: 1,516
Registered: 12/7/98
Re: what's wrong with this SQL?
Posted: Jan 16, 2007 10:03 AM in response to: yingkuan Reply
Scratch the VALUES keyword then make sure that the select list matches the column list in number and type.
1 insert into marktest
2 (fld1, fld2, fld3, fld4, fld5)
3* select * from marktest
UT1 > /
16 rows created.
HTH -- Mark D Powell --
Jagan
Posts: 41
From: Hyderabad
Registered: 7/21/06
Re: what's wrong with this SQL?
Posted: Jan 16, 2007 10:07 AM in response to: jerrygreat Reply
try this - just paste the code and give me the error- i mean past the entire error as it is if error occurs
INSERT INTO xhealthcall_script_data
(xhc_call_ended, xhc_switch_port, xhc_script_id,
xhc_fax_specified)
SELECT TO_DATE (hh_end_date || ' ' || hh_end_time, 'MM/DD/YY HH24:MI:SS'),
hh_switchport, hh_script, 'N'
FROM tmp_healthhit_load
WHERE hh_script != 'BROCHURE'
UNION
SELECT TO_DATE (hh_end_date || ' ' || hh_end_time, 'MM/DD/YY HH24:MI:SS'),
hh_switchport, hh_script, 'N'
FROM tmp_healthhit_load
WHERE hh_script != 'BROCHURE';
Regards
Jagan
jerrygreat
Posts: 8
Registered: 1/3/07
Re: what's wrong with this SQL?
Posted: Jan 16, 2007 11:31 AM in response to: Jagan Reply
Hi, Jagan:
thank you very much for your answer.
but when I execute it, I still can get error like:
ERROR at line 1:
ORA-03113: end-of-file on communication channel
so wired, do you have any ideas?
thank you very muchAnd this one,
Aother question about SQL?
I thought I already told him to deal with
ORA-03113: end-of-file on communication channel
problem first.
There's nothing wrong (syntax wise) with the query. (of course when no "value" in the insert) -
I don't know what's wrong with my iPhone, I can listen to music but if I try to take a video you can't hear my voice, if I take a voice memo you can hear my voice.
try exiting the app and double clicking the home button. the multitasking apps will show up. delete all of them by holding them down and pushing the red circle (dont worry that doesnt remove them from the phone, just completely closes the app and makes your device run faster) then power off your phone by holding down thw lock button and sliding the red arrow when it comes up. wait about 5 seconds after its completely off and turn it back on. then try using the mic. hope this helps
-
What is wrong with my iphone4? and how can i turn it back on?
About a week ago, i was using my iphone that I've had about 6 months, no problems. It was working perfectly fine and then out of nowhere it shut itself off. I plugged it in, nothing happened. I pressed the home and lock button, and held them in, and still nothing happened. The next day I decided to plug it in again, and it told me to leave it plugged in, like it was dead or something (the red battery symbol popped up, and said it was charging) and about 10 minutes later the iphone came back on. The only problem was that from here on out my home button does NOT work, at all.
The phone was working................ until about 3 days later the same thing happened to it again, except the next day it did not come back on the same way. My mom took it to the AT&T store (living in west virginia, there aren't any Apple stores near by). She came home with it working again, but I have no clue how they got it back on.
A few days after the second time it shut off, it happened again. We took it to AT&T again, and this time they couldn't get it back on, but they gave us some tips. We plugged it into itunes, and restored it. I was over the amount of space. I had no storage left!! So I went through and deleted all my music, and about 500 photos (having around 1,200) . I now have about 700 photos, 20 songs, and roughly 15 apps. ONE day after I did all of this, my phone shuts off for the fourth time !!!! (It is off right now) Seeing how I have 3 GB of space left on my phone, I would think it's not a storage issue.
I've plugged it into the wall charger, nothing! I have tried to reset it holding the home button (which still does not work) and lock button, still nothing. I have now plugged it into itunes. It says the device is found, but not identified please restore the device. So I restore it, but that doesn't help, Itunes still cant "identify" the device and it is still not on.
I have checked for water damage, and there is not any! I just want to know what is wrong with it, and how to fix it. OR maybe if I just need to get a whole new phone, because mine is under warranty. The problem is AT&T won't give me a new one and there isn't an apple store near me! Can someone PLEASE help?I think you might get a new phone instead of repairing it as it takes time and you said the repairing center is far from your living place
-
Some of my songs in iPad Mini with RD disappeared all the sudden and I need to redownload it again. Same thing happen to my iPod touch 5 too. What's wrong with it? Is it the iOS problem?
Delete the music in your iTunes library, then go to iTunes store, Quick Link, 'Purchased' to redownload again.
-
What went wrong with Nokia Messaging?
What went wrong with Nokia Messaging?
In the beginning of this year I used Nokia Messaging on E71 and I really loved it!
Since this autumn I am using it on my new N97 and I am confronted with totally different experience:
- the application is very slooooow..
- its unreliable - very ofter emails arrive with hours delay, a sync may take up to minutes
- its very very buggy - truncated icons, diplay randomly jumping up and down, when scrolling.
- very bad HTML display of emails - tiny (unreadable) default font and no wrap to screen when zooming - I thought emails were for reading?
- many, many usability issues
I just cannot believe it - How has Nokia managed to convert once such a good piece of software into such incredible disaster?
Recently an update was published - I tried it immediately... To my big disappointment it contains all the same bugs and introduces new ones..
How is this possible? What is happening at Nokia?Also my N86 as the same problem.
And in global setting Nokia deleted the option to read always in HTML.
And there is not any option to write html Mails -
What's wrong with my code? compliation error
There is a compilation error in my program
but i follow others sample prog. to do, but i can't do it
Please help me, thanks!!!
private int selectedRow, selectedCol;
final JTable table = new JTable(new MyTableModel());
public temp() {
super(new GridLayout(1, 0));
table.setPreferredScrollableViewportSize(new Dimension(600, 200));
table.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
ListSelectionModel rowSM = table.getSelectionModel();
rowSM.addListSelectionListener(new ListSelectionListener() {
public void valueChanged(ListSelectionEvent e) {
//Ignore extra messages.
if (e.getValueIsAdjusting()) return;
ListSelectionModel lsm = (ListSelectionModel)e.getSource();
if (lsm.isSelectionEmpty()) {
System.out.println("No rows are selected.");
else {
selectedRow = lsm.getMinSelectionIndex();
System.out.println("Row " + selectedRow+ " is now selected.");
JScrollPane scrollPane = new JScrollPane(table);
add(scrollPane);
createPopupMenu();
public void createPopupMenu() {
//Create the popup menu.
JPopupMenu popup = new JPopupMenu();
// display item
JMenuItem menuItem = new JMenuItem("Delete selected");
popup.add(menuItem);
menuItem.addActionListener(new ActionListener(){
public void actionPerformed(ActionEvent e){
System.out.println("Display selected.");
System.out.println("ClientID: "+table.getValueAt(selectedRow,0));
int index = table.getSelectedColumn();
table.removeRow(index); <-------------------------------compliation error
}}); //what's wrong with my code? can anyone tell
//me what careless mistake i made?
MouseListener popupListener = new PopupListener(popup);
table.addMouseListener(popupListener);
public class MyTableModel extends AbstractTableModel {
private String[] columnNames = { "ClientID", "Name", "Administrator" };
private Vector data = new Vector();
class Row{
public Row(String c, String n, String a){
clientid = c;
name = n;
admin = a;
private String clientid;
private String name;
private String admin;
public MyTableModel(){}
public void removeRow(int r) {
data.removeElementAt(r);
fireTableChanged(null);
public int getColumnCount() {
return columnNames.length;
public int getRowCount() {
return data.size();
public String getColumnName(int col) {
return columnNames[col];
public Object getValueAt(int row, int col) {
return "";
public boolean isCellEditable(int row, int col) {
return false;
public void setValueAt(Object value, int row, int col) {}
}Inside your table model you use a Vector to hold your data. Create a method on your table model
public void removeRow(int rowIndex)
data.remove(rowIndex); // Remove the row from the vector
fireTableRowDeleted(rowIndex, rowIndex); // Inform the table that the rwo has gone
[/data]
In the class that from which you wish to call the above you will need to add a reference to your table model. -
What's wrong with my app?
What's wrong with my app? I tried to download it multiple times, restart, delete, repeated. It'll download, but not really finish. The app remains blackout and says downloading. Help me out please. And yes, I already followed apple's guidelines on their sight to try and resolve the issue. No luck.
Have you tried restarting your phone? If you have and your problem is not resolved, then best thing to do is to wait for Apple to release a new update for iOS and then re-try the download. I am sure this problem will be fixed. However, if in the next update, the problem is not resolved I recommend reporting this problem to Apple so they can fix it in their next iOS update. Hope this has helped.
-
What's wrong with my player?!!? PLAYBACK ERR
Whats wrong with my Zen Touch if my player keeps saying playback error? it plays like 5 seconds of the song before it shows that there is a "playback error" and skips to the next song? i tried fastforwarding past the 5 seconds, and it played fine....what's wrong with it's i had this problem with a couple of my songs...
this sucks... oh yeah, i also tried restarting it. didnt work either.I had the same issue. I used MP3LIBRARY (free program) to analyze and then delete the bad frames out of the files. then they playd fine. just google mp3library and download it...
-
My ipod keeps restarting, what is wrong with it?
my ipod keeps restarting and deleting music, what is wrong with it?
Try the standard fixes to rule out a software problem:
- Reset. Nothing is lost
Reset iPod touch: Hold down the On/Off button and the Home button at the same time for at
least ten seconds, until the Apple logo appears.
- Restore from backup
- Restore to factory settings/new iPod
if still problem that indicates a hardware problem and an appointment at the genius Bar of an Apple store is in order. -
WHAT IS WRONG WITH 5230???
What is wrong with my 5230?
For like 2 weeks now I do not get any alert for a message.
I do not get a vibrate, or alert on my homescreen.
I always have to go to messages and when in inbox it has new messages?
**bleep**????
C'mon nokia help here?
I have rebooted my phone plenty times.
Let me rephrase that "it reboots ITSELF".
Thank you
Lumia 810 (T-Mobile) OwnerTry 2 things..
A.) Take a back up of only 'Messages' on your PC using OVI Suite..
Delete all messages from the phone ... Reboot and try... If problem is solved then the Message qty is problem..(though going by your details it may not be.) But no harm in trying as you have to just restore them back if the problem lies somewhere else..
B.) Take back-up.. All data without 'Settings' (Just for Safety.. may not be needed at all..)
Do a 'Factory Reset' thru' phone menu and check.. This should not delete anything from your phone but you will have to only do the Settings / Personalisations again..
--------------------------------------------------------------------------------------------------------------------------------------------------------If you find this helpful, pl. hit the White Star in Green Box...
Maybe you are looking for
-
When i browse to a webpage firefox freezes then (not responding)
I turn on firefox and everythign seems alright, but once i click on the URL blank and type something in when it tries to load the page, it hangs,freezes, then eventually says "Not Responding" and at that point i have to End the process. This hasn't b
-
This is a clean install from s disc onto a 3TB GPT drive. This is for testing. I'm not concerned with finding a more practical solution for this installation. There is no image or answer file involved. But at the "Completing Installation" phase, I re
-
HT201363 Security questions and answers
i need help sending my security questions and answers to my email, it says theyve been sent but i recieve nothing in my email and ive checked all folders
-
Aliases Mobile Me Vs Icloud - Unexpected result.
Hi! I just migrated from Mobile Me to icloud. I was using all available alias spots (let's call them 1,2,3,4 for the order they were created). I understood that existing Mobile Me accounts could keep their aliases. I can receive email to all of my
-
Hi friends, Can anyone please tell me what does someone mean when he say designing COA. Please share some knowledge on difining ,developing ,mapping COA interfaces with legacy systems. Thanks