did not assign to new variable and needed to switch boolean in condition