fix results duplicating, add comparison option for functions