probably, just put the function within an "if" statement so the effect only happens if that statement is true