set event properly