modularize the exam and remove the globals
add specified seed to the exam generator to ensure consistent tests when needed