modified main()