modified with require.js.