private Node deleteNode(Node node) {
		if (node.getLeft() == null && node.getRight() == null) {
			return null;
		} else if (node.getLeft() == null && node.getRight() != null) {
			return node.getRight();
		} else if (node.getLeft() != null && node.getRight() == null) {
			return node.getLeft();

		} else {
			Node parentOfSwitchNode = null;
			Node switchNode = node.getRight();
			while (switchNode.getLeft() != null) {
				parentOfSwitchNode = switchNode;
				switchNode = switchNode.getLeft();
			}
			node.setKey(switchNode.getKey());
			if (switchNode == node.getRight()) {
				node.setRight(switchNode.getRight());
			} else {
				parentOfSwitchNode.setLeft(switchNode.getRight());
			}

			return node;
		}
	}