Updated version prepared for Assignment 2