Added 'createStub' functionality