removin while code since assumed all images exist