refactor preload