looking at a better way to handle events