slight refactor; added a "viewLoaded" trigger