put/get logic in main()