rename switch to clarify its function.