Adapted to latest criterion