public static TreeNode getMRCA(TreeNode curn1, TreeNode curn2) {
		//get path to root for first node
		ArrayList<TreeNode> path1 = new ArrayList<TreeNode>();
		TreeNode parent = curn1;
		while (parent != null) {
			path1.add(parent);
			parent = parent.getParent();
		}
		//find first match between this node and the first one
		parent = curn2;
		while (parent != null) {
			if (path1.contains(parent)) {
				return parent;
			}
			parent = parent.getParent();
		}
		return null;
	}