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