This Pharisee (just like work salvationists today) think they are doing it:
Luke 18:9 - Also He spoke this parable to some who trusted in themselves that they were righteous, and despised others: 10 "Two men went up to the temple to pray, one a Pharisee and the other a tax collector. 11 The Pharisee stood and prayed thus with himself, 'God, I thank You that I am not like other men--extortioners, unjust, adulterers, or even as this tax collector. 12 I fast twice a week; I give tithes of all that I possess.' 13 And the tax collector, standing afar off, would not so much as raise his eyes to heaven, but beat his breast, saying, 'God, be merciful to me a sinner!' 14 I tell you, this man went down to his house justified rather than the other; for everyone who exalts himself will be humbled, and he who humbles himself will be exalted."