Function eval() calculate already the result before sending inputs to the switch (the calculation should be done by the switch) So, it should be removed.