You can replace items.length with len here.