added the dynamic PID-functionality and some event-dispatcher