add require.js logic