filter function is complete.