deleting an element from an arraywas completed