Better compare alrorithm and print