refactoring observable