added contentloaded function and named functions in mastery.js