add maketree function : checkConflict