run main goroutine synchronously