moving event stuff to web.js temporarily