priniting, compare() implemented