Initial code for exam 3.