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