oragnized code, put all main code into a main()