add variables that will indicate whether or not we are looping through the original image rows