removed unnecessary variable in filter