Filtering sequentially according to extensions