private AVLEntry<K, V> deleteElem(AVLEntry<K, V> top) {
		if (top.getLeft() == null && top.getRight() == null) {
			//leaf
			return null;
		} else if (top.getLeft() == null) {
			// has right child
			return top.getRight();
		} else if (top.getRight() == null) {
			// has left child
			return top.getLeft();
		} else {
			// 2 children
			AVLEntry<K, V> replacementNode = getLeftMost(top.getRight());
			AVLEntry<K, V> newRight = deleteLeftMost(top.getRight());
			replacementNode.setRight(newRight);
			replacementNode.setLeft(top.getLeft());
			return rebalance(replacementNode);
		}
	}