if fold is 0, then our condition is false, changed so that we check if fold is not None