update and use require.js