refactoring, improving load logics