Changed eval method to use a switch and  general hardening