You don't become righteous by doing right; you do right because you've been made righteous.