update imagechecking.py for sorting the results