Removing unecessary temporary variable