refactored hash variable in .trending method