added Alex's funcs to main()