added random images and rank calculations