modify scan.js