cleaned up main()
phase2: scanner is done