refactor redis client