adding error capturing to subscribe()