Added support for n-order chains