added the event class, which works pretty well

though it is pretty hacked together