Change reduce to filter