having serious issues with the iterator