add 'loader.js' to be used as a shared utility