snippet for stub_chain