moved loading photos to background thread