tree branch filtering