updating event managing + if statement simplification