added callback method to preload