add optional startidx and endidx to walk
use double splat for metric construction
add startidx and endidx