changing to multi threading the image loading