replace synchronous Stream with Rx Stream from RxJava