Single-threaded code for Assignment 2, Question 2