implemented filter by type