update the method of array