remove orphans, option to filter by status code and pdgId