adapted to changes in state_filtering, linking error currently