refactor, move preloading into the model