fix function signature
rename current scan code variable