added code to supplied stubs