refactoring lazy load functions