actually run functions in main