Adding event handling for web interface. still in process