added custom chains support