total iteration working