reorganized code in 'script.js'