Assignment 3 Code