updated redis create logic