Added support for chains