connect to redis in both methods