added filtering by type