updated to save in redis