Adding overload operator < to preferred and history