Added code to Observer