update events logic