added chain support