refactoring util.loader into view