refactoring Observable class