adding loaded() function to environment
adding msg.js to library