making it nicer using require.js