refactor main loaders