Improved Assignment 1