added observer pattern and an example how to use it to Application class