Optimization by switching from Promises to Observables