renamed images, sorted the output files