This needs a separate if-clause like in the loop (passesStepUpTo != passesStep)