change bindEvents conditionals to switch statement