added some more event code, unfinished