For what saith the scripture? Abraham believed God, and it was counted unto him for righteousness.
Romans 4:3 (KJV)
We are righteous in the sight of God not because of our works, but as a result of us believing Him. It is faith in the finished works of Jesus Christ that makes us one hundred percent righteous. And it is out of us believing our identity in Christ Jesus that we bear fruit in our lives. Right believing will always produce right living.