In the book of Psalms you have one of the mightiest warrior/kings in the bible singing and writing his heart out. David was a man just like you and I. He made zillions of mistakes. He tried very hard not to but...he was human. But God had his hand on him from day one. These next verses sums it up. David is asking of God, Psalms 51:10-13 Create in me a clean heart, O God. Renew a loyal spirit within me. Do not banish me from your presence, and don’t take your Holy Spirit from me. Restore to me the joy of your salvation,and make me willing to obey you. Then I will teach your ways to rebels, and they will return to you.