Partial code for assignment 2