refactored: _data function for redis calls