refactorization of filter of the state data