Add threefold check