Added methods CompareTo and Iterator