Context dependent path filtering scheme