Added extendAsObservable function