restructures main to mimic output example