removing temporary variable str