@jswauto, I assume that David was already saved when he wrote that Psalm, because God calls him a man after his own heart, but he sinned greatly when he committed adultery and murder. Here, he is praying the way I mention, for God's cleansing power, as God has already declared him not guilty...