Fixing example to use rx factory