Made minor changes to homework code