move body to main()