updated require.js logic