extended chain.swift docstring