implementation of aufgabe 5.2 observer model with annotations