sync
sync
Added event probability function