implemented secure summing with retry