Assignment 1 code