add method to stub_chain to fix failing tests