changed Filter to take object