handleresults correct comparison algorithm