moved preload to end of wrapper