initial try at making this modular using require.js