measure switch with passing arguments