better use of the rxjava api