public void erase(int index)
	{
		// quick clear if removing only entry in tree
		if(tree.size() <= 1){
			tree.clear();
			return;
		}
		
		// Copy last item into current item
	    tree.elementAt(index).copy(tree.elementAt(tree.size()-1));
	    update_weights(index);
	    
	    tree.removeElementAt(tree.size()-1); 

	    // update replacement node's old parents
	    if( (tree.size() % 2) >= 0 ) { // then odd number, old size was even (female node)
	        update_weights( (tree.size()-1)/2 ); // update old parent of female
	    }
	    else { // was a male node
	        update_weights( tree.size()/2 - 1 ); // update old parent of male
	    }
	}