put in length check for deleted items so array is not created every update.