remove nasty temporary variable mutation