Obediently carrying out Christ’s teachings is not ‘works’. You do not need to question the motives of this obedience. Jesus didn’t.