added chain support
added to example
solved merge