modified checks.js