v.002 optimize the array method