Removed temporary variable in 1d iterator