adding Observer pattern