refactoring redis client