modified event target to switch case