2nd revision to homework1