Paul also wrote Romans 7:12...
So then, the law is holy, and the commandment is holy, righteous and good.
I also know Messiah came because the righteousness of the Law was contrary to us and actually condemned us because of sin. Though people believe just that. Most do not consider that it was not the righteousness which condemned, rather it is sin that took the opportunity afforded it by the righteous instructions given to condemn to death the sinner.
Now we have been brought close to the promise and covenants so we can be partakers of the inheritance from Elohim to all who would believe him.
So what are we to do to attain righteousness? Only receive it. It is a free gift. The instruction has become our sanctification through doing the Good works written in it for our edification as one body with Messiah as the head.
You are like a man who looked into a mirror, (Law of God) saw his condition and was convicted. How ever as soon as you turned away forgot what you saw and continued to walk in lawlessness.
Not only that but have you forgotten that, there is now no longer any condemnation for those found in Messiah? So if it is true that you're righteousness is a free gift and not your own, (like I believe) then we should live life for Messiah and as he does for our example. Obedience to the Father's instructions even too death on the cross.
Galatians 3:10-14
10 For as many as are of the works of the law are under the curse: for it is written, Cursed is every one that continueth not in all things which are written in the book of the law to do them.
11 But that no man is justified by the law in the sight of God, it is evident: for, The just shall live by faith.
12 And the law is not of faith: but, The man that doeth them shall live in them.
13 Christ hath redeemed us from the curse of the law, being made a curse for us: for it is written, Cursed is every one that hangeth on a tree:
14 That the blessing of Abraham might come on the Gentiles through Jesus Christ; that we might receive the promise of the Spirit through faith.
There is no condemnation for those who are in Christ. For those who would rather work at the law the curse and the condemnation are still there to bring them back.
Galatians 5:1 Stand fast therefore in the liberty wherewith Christ hath made us free, and be not entangled again with the yoke of bondage.
You don't understand obedience if you think it is by righteous instruction. You don't understand Christ if you think you are supposed to do what He did. Christ freed us so we wouldn't be condemned by what He suffered for and delivered us from, the law.
Romans 4:4-5
4 Now to him that worketh is the reward not reckoned of grace, but of debt.
5 But to him that worketh not, but believeth on him that justifieth the ungodly, his faith is counted for righteousness.