pull the preloader allocation in to a factory method