corrected mvc pattern and added observer pattern