switched to using jQuery style events