remove the element in array