fix filter function define