Lab5: Added observer pattern