Added chain detection algorithm