Doing assignment 2