fixing observer pattern

just to let things more similar to pattern given by prof. Paul