add loadAssets function