use rxjs to help to manage event stream.