codeScanner helper class