Our good works do not generate righteous.  Rather our righteousness in Christ generates good works.