solution that should work with require.js