Basic implementation of the observer-pattern