Moving switch parameters inside code block