refactor extracting redis url