working on event struct. need a decode function. need to validate struct on encode/decode