renamed mode enum to a bool to iterateModel