16 Now they did not suppose that salvation came by the law of Moses; but the law of Moses did serve to strengthen their faith in Christ; and thus they did retain a hope through faith, unto eternal salvation, relying upon the spirit of prophecy, which spake of those things to come.
I think these verses teach something significant about the relationship between grace and works. For them, obeying the law of Moses was done out of faith in Christ and a belief in the power of his salvation. And so, even though the law itself was powerless to save, their obedience was consecrated for their God. Because they were willing to act in faith, their faith was strengthened and they were able to retain hope in eternal life.
Following commandments and doing good deeds only have salvific force if it is coupled with faith in Chirst and with his divine grace. Our deeds cannot earn us eternal life. But on the other hand, it cannot be said that deeds are simply by products of faith. They are integral steps in a self-reinforcing cycle whereby strengthened faith results in an increased commitment to righteoues living and righteous living increases one’s faith and commitment to follow Christ.