should also filter the cases by type if possible.