Modified initial R stubs provided in Assignment