Assignment 1 solution