added type cases when filter by with collection