refactoring observe