coverting to require.js containing syntax