Henry Nicholls credits personal failure early in his career for his valuable contribution to New Zealand's game plan Friday as they dominated the second Test against Sri Lanka in Christchurch.
A year ago the middle-order batsman was struggling to hold his place in the side.
But a personal best 162 not out, and a 214-run partnership with Tom Latham (176) were key to New Zealand having Sri Lanka on the ropes at the end of the third day.
New Zealand declared their second innings at 585 for four, to lead by 659 runs and at stumps Sri Lanka in their second innings were two for 24.
"I was really lucky. I learned a lot early in my career through a lot of failure," said Nicholls after his third century this year.
It has lifted his average to a respectable 43.15 in his 22nd Test. It was under 25 after his first 10 innings.
"I consider myself really grateful, the selectors and everyone in the team had a lot of confidence and faith in me that I'd use those experiences to make me a better player," he said.
And it was as the better player that he and Latham, and later Colin de Grandhomme (71 not out), combined to effect a plan to tire the Sri Lankans in the field.
"That's what we tried to do in terms of keeping them out for so long , especially in that last period, running them around as much as we could," the 27-year-old said.
"Then having that little burst later in the day, picking up a couple of big wickets was probably the ideal script for us."
Play resumes on the fourth day Saturday with Dinesh Chandimal on 14, Kusal Menis on six and Sri Lanka needing another 636 runs with eight wickets remaining.
Only three times in cricket history has the winning side scored more than 400 in the fourth innings, with the current record of 418 set by the West Indies against Australia 15 years ago in Antigua.
The highest fourth innings score in the modern era is New Zealand's 451 chasing 550 against England in 2002, while England scored 654 for five after being set a target of 696 by South Africa in 1939.
Unlike the first Test in Wellington, where rain washed out most of the final day, fine weather is forecast for the remainder of the Christchurch Test.