enhancement test for filter and remove some unuse code