do everything in main()