moved events to util. fixed the ASM too