changed end to actually run, and also sendNewFunc to actually run