preprocessEvents updated

temporary solutions are still present in the method, and also there are
a few missing subfunctions