moved json formatting to redis to reduce calls to 1