Assignment4 for SI664