debugging the remove method in heap