settles all kind of events. probably not always the optimal solution, but at least a good solution