moved away from using generic collections and implemented foreach loops