Updated with the non-filtering case