add condition to uptreematch