added support for require.js