self was not defined in preloadImages