switch working
with event