So how is righteousness imputed. I read the whole of the entire passage and it says righteousness is imputed. It does not come for works (if you read the whole chapter).
strong's impute:
Strong's Concordance
ellogeó: to charge to one's account, impute
Original Word: ἐλλογέω
Part of Speech: Verb
Transliteration: ellogeó
Phonetic Spelling: (el-log-eh'-o)
Definition: to charge to one's account, impute
Usage: I charge to, put to one's account, impute.
NAS Exhaustive Concordance
Word Origin
from en and logos (in the sense of account, reckoning)
Definition
to charge to one's account, impute
NASB Translation
charge...to...account (1), imputed (1).