Made more clear the algorithm in scientific.event_based