added better image preloading