Psalms 119:67-71 NIV
Before I was afflicted I went astray,
but now I obey your word.
You are good, and what you do is good;
teach me your decrees.
Though the arrogant have smeared me with lies,
I keep your precepts with all my heart.
Their hearts are callous and unfeeling,
but I delight in your law.
It was good for me to be afflicted
so that I might learn your decrees.
NIV: New International Version