Automatic double, half, chain detection