clear array content after each loop in computeDigest function