Assignment 2 coding