changed the way the match is found to find a closer match and altered the way the image is created