some replacemetns due to name changes in state_filtering, has to be tested
resolved conflict