Renamed filter method to filterWithBlock for consistency and to avoid naming collisions