moved print out of main()