Added rerouting filter and check

Rerouting filter logic