filter by distance and by name