functionality to output and parse through images